package com.xiaoxu.spark_base.example.SQL_Datasets_DataFrames.dataSource

import org.apache.spark.sql.SparkSession

object HiveSources {

  def main(args: Array[String]): Unit = {
    val spark = SparkSession
      .builder()
      .appName("Spark Hive Example")
      .master("local[2]")
      //.config("spark.sql.warehouse.dir", "/user/hive/warehouse/")
      .enableHiveSupport()
      .getOrCreate()

    import spark.implicits._
    import spark.sql

    spark.table("dept").show

  }

}
